package com.ksd.system.service.impl;

import com.ksd.system.domain.SysChannel;
import com.ksd.system.mapper.SysChannelMapper;
import com.ksd.system.service.ISysChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 频道管理Service业务层处理
 * 
 * @author y.wu
 * @date 2025-01-08
 */
@Service
public class SysChannelServiceImpl implements ISysChannelService
{
    @Autowired
    private SysChannelMapper sysChannelMapper;

    /**
     * 查询频道管理
     * 
     * @param id 频道管理主键
     * @return 频道管理
     */
    @Override
    public SysChannel selectSysChannelById(Long id,String tableName)
    {
        return sysChannelMapper.selectSysChannelById(id,tableName);
    }

    /**
     * 查询频道管理列表
     * 
     * @param sysChannel 频道管理
     * @return 频道管理
     */
    @Override
    public List<SysChannel> selectSysChannelList(SysChannel sysChannel,String tableName)
    {
        return sysChannelMapper.selectSysChannelList(sysChannel,tableName);
    }

    /**
     * 新增频道管理
     * 
     * @param sysChannel 频道管理
     * @return 结果
     */
    @Override
    public int insertSysChannel(SysChannel sysChannel,String tableName)
    {
        return sysChannelMapper.insertSysChannel(sysChannel,tableName);
    }

    /**
     * 修改频道管理
     * 
     * @param sysChannel 频道管理
     * @return 结果
     */
    @Override
    public int updateSysChannel(SysChannel sysChannel,String tableName)
    {
        return sysChannelMapper.updateSysChannel(sysChannel,tableName);
    }

    /**
     * 删除频道管理信息
     * 
     * @param id 频道管理主键
     * @return 结果
     */
    @Override
    public int deleteSysChannelById(Long id,String tableName)
    {
        return sysChannelMapper.deleteSysChannelById(id,tableName);
    }

    @Override
    public int clearSysChannel(String tableName) {
        return sysChannelMapper.clearSysChannel(tableName);
    }

    @Override
    public SysChannel selectSysChannelByNameAndBoardId(String name,Long boardId,String tableName) {
        return sysChannelMapper.selectSysChannelByNameAndBoardId(name,boardId,tableName);
    }

    @Override
    public SysChannel selectSysChannelByName(String name,String tableName) {
        return sysChannelMapper.selectSysChannelByName(name,tableName);
    }

    @Override
    public List<SysChannel> selectSysChannelListByAndStatus(String status,String tableName) {
        return sysChannelMapper.selectSysChannelListByAndStatus(status,tableName);
    }

    @Override
    public List<SysChannel> selectSysChannelListAndSelectStatus(SysChannel sysChannelOne,String tableName) {
        return sysChannelMapper.selectSysChannelListAndSelectStatus(sysChannelOne,tableName);
    }

    @Override
    public List<SysChannel> selectSysChannelListByOrStatus(String status1,String status2,String tableName) {
        return sysChannelMapper.selectSysChannelListByOrStatus(status1,status2,tableName);
    }
}
